/**
 * 
 */
package com.ahq.character;

import com.ahq.character.flyweight.AHQCharacter;

/**
 * @author Donald
 */
public final class Player {
	/** the singleton instance. */
	private static Player	instance;
	/**
	 * Gets the one and only instance of {@link Player}.
	 * @return {@link Player}
	 */
	public static Player getInstance() {
		if (Player.instance == null) {
			Player.instance = new Player();
		}
		return Player.instance;
	}
	/** the current player being handled by this class. */
	private AHQCharacter	currPlayer;
	/** the next available reference id. */
	private long			nextRefId	= 0;
	/**
	 * Gets the current player being handled by this class.
	 * @return {@link AHQCharacter}
	 */
	public AHQCharacter getCurrPlayer() {
		return currPlayer;
	}
	/**
	 * Gets the next available reference id.
	 * @return long
	 */
	public long getNextRefId() {
		return nextRefId++;
	}
	/**
	 * Sets the current player being handled by this class.
	 * @param val the {@link AHQCharacter} to set
	 */
	public void setCurrPlayer(final AHQCharacter val) {
		currPlayer = val;
	}
}
